package com.code.controller;

import com.code.feign.MessageFeign;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping(value = "/message")
@Slf4j
@ApiOperation(value = "消息推送",notes = "消息推送")
public class MessageFeignController {

    @Autowired
    private MessageFeign messageFeign;
    
    @ApiOperation(value = "推送消息" , notes = "推送消息")
    @RequestMapping(value = "/send/{str}")
    public String getSend(@PathVariable("str") String str){
        messageFeign.send(str);
        return "redirect:/";
    }

}
